[index]

Repeat Control Statement

Syntax

repeat for <number> times end repeat

Description

The repeat for control statement causes the block of Oracle Media Talk statements between its first and last lines to execute <number> times, unless an exit, exit to top, exit repeat, or pass statement is encountered. The next repeat control statement causes the code to jump immediately to the beginning of the repeat loop, incrementing the loop counter.

Notes

Examples

The following script, when placed in a button, prompts the user to enter five numbers, which are summed and returned: on mouseUp put 0 into total repeat for 5 times ask "Please enter a number..." put total + it into total end repeat type total
This text has been mechanically extracted from the Oracle Media Objects 1.0.4.9 MediaTalk Reference, © 1995 Oracle Corporation, and is provided here solely for educational/historical purposes.